package jsp_0810;

import java.io.*;
import java.util.*;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class WhatTime
 */
@WebServlet("/WhatTime")
public class WhatTime extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

		response.setCharacterEncoding("EUC-KR");
		Calendar cal = Calendar.getInstance();
		
		Random rd = new Random();
		int i = rd.nextInt(101);
		
		PrintWriter pw = response.getWriter();
		pw.write(cal.toString());
		pw.println("");
		pw.write("랜덤한 숫자는:"+ i);
		pw.println("");
		pw.close();
	}
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	}

}
